<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${pageContext.request.contextPath }/css/css.css" rel="stylesheet">
<script type="text/javascript" src="${pageContext.request.contextPath }/jquery/jquery-1.8.2.js" ></script>
<title>Insert title here</title>
</head>
<body>

	<c:if test="${u.lev==0 }">
	<table>
	<tr>
	<td>学生编号</td>
	<td>学生姓名</td>
	<td>学生宿舍</td>
	</tr>
	<tr>
	<td>${r.uid }</td>
	<td>${r.uname }</td>
	<td>${r.dname }</td>
	</tr>
	</table>

	<form action="list" method="post">
	<table>
		<tr>
		<td>学生姓名</td>
		<td>住宿楼</td>
		<td>宿舍号</td>
		<td>入住时间</td>
		<td>退租时间</td>
		</tr>
		<c:forEach items="${pg.list }" var="l">
		<tr>
		<td>${l.uname }</td>
		<td>${l.fname }</td>
		<td>${l.dname }</td>
		<td>
		<fmt:formatDate value="${l.inTime }" pattern="yyyy-MM-dd"/>
		</td>
		<td>
		<fmt:formatDate value="${l.outTime }" pattern="yyyy-MM-dd"/>
		</td>
		</tr>
		</c:forEach>
	<jsp:include page="/jquery/page.jsp"></jsp:include>
	</table>
	
	</form>
	</c:if>
	
	
	
	<c:if test="${u.lev==1 }">
	<form action="list" method="post">
	宿舍名<input type="text" name="dname" >&emsp;
	住宿楼
	<select name="fid">
	<option value="">请选择</option>
	<c:forEach items="${floor }" var="f">
	<option value="${f.fid }">${f.fname }</option>
	</c:forEach>
	</select>
	&emsp;
	<input type="submit" value="查询">&emsp;
	<a href="toAdd" ><input type="button" value="调度"></a>
	<table>
		<tr>
		<td>宿舍id</td>
		<td>宿舍名</td>
		<td>住宿楼名</td>
		<td>当前宿舍人数</td>
		<td>当前宿舍入住人名</td>
		<td>图片</td>
		</tr>
		<c:forEach items="${pg.list }" var="l">
		<tr>
		<td>${l.did }</td>
		<td>${l.dname }</td>
		<td>${l.fname }</td>
		<td>${l.unames }</td>
		<td>${l.count }</td>
		<td>${l.pic }</td>
		</tr>
		</c:forEach>
	<jsp:include page="/jquery/page.jsp"></jsp:include>
	</table>
	</form>
	</c:if>
	
	
	

</body>
</html>